<!--
  @author heguanghua
  @since 2020/04/25 14:04
-->
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">

<table class="layui-hide" id="zmn-table" lay-filter="zmn-table" th:fragment="table">
    <thead >
        <tr>
            <th lay-data="{type:'radio', width:50, unresize:true, align:'center', fixed:'left'}" th:if="${multi == null || multi != 2}"></th>
            <th lay-data="{type:'checkbox', width:50, unresize:true, align:'center', fixed:'left'}" th:if="${multi != null && multi == 2}"></th>
            <th lay-data="{field:'roleId', width:80, unresize:true, align:'center'}">角色ID</th>
            <th lay-data="{field:'roleName', width:220, unresize:true, align:'left'}">角色名称</th>
            <th lay-data="{field:'type', width:110, unresize:true, align:'center'}">角色类型</th>
            <th lay-data="{field:'exportLimit', width:90, unresize:true, align:'center'}">导出上限</th>
            <th lay-data="{field:'remark', unresize:true, align:'left'}">备注说明</th>
            <th lay-data="{field:'status', width:80, unresize:true, align:'center'}">状态</th>
            <th lay-data="{field:'操作', width:110, unresize:true, align:'center', fixed:'right'}"></th>
        </tr>
    </thead>
    <tbody>
        <tr th:each="item:${items}">
            <td></td>
            <td th:text="${item.roleId}">roleId</td>
            <td th:text="${item.roleName}">roleName</td>
            <td th:text="${T(com.zmn.mcc.common.constant.RoleDict).roleTypeMap().get(item.type)}">type</td>
            <td th:text="${item.exportLimit == null || item.exportLimit == 0 ? '' : item.exportLimit}">exportLimit</td>
            <td th:text="${item.remark}">remark</td>
            <td>
                <span th:class="${item.status * 1 == 2 ? 'status-green' : 'status-gray'}" th:text="${T(com.zmn.common.dictionary.GlobalDict).getStatus(item.status * 1)}">status</span>
            </td>
            <td>
                <a th:lay-href="|${SYS_MCC}/role/detail.action?roleId=${item.roleId}|" class="layui-btn layui-btn-xs layui-btn-primary" lay-text="角色信息">查看</a>
                <a href="javascript:void(0);" class="layui-btn layui-btn-xs layui-btn-normal" lay-event="add">选择</a>
            </td>
        </tr>
    </tbody>
</table>
